Interface thresholds
Threshold value access for tools.
The thresholds interface provides access to the current values of
tool thresholds. It is accessed as self.thresholds from within tool Extension methods.
Threshold access
Range thresholds specified in the Threshold list to
Tool.register are accessed as
properties of the thresholds interface by name :
self.thresholds.ThresholdName
This provides an instance of the Threshold class,
representing the specific threshold.
For example with these thresholds and results:
results={ {name="SomeValue", type="int"} }, thresholds={ {name="SomeValue", type="intrange", range={0, 100} }
The threshold for SomeValue is used like this in the execute method of a tool:
local someValue = someAnalysis(image) local valueOK = self.thresholds.SomeValue:contains(someValue) output:add("Pass", valueOK)